package com.hzjy.api.service.impl;


import com.hzjy.api.beans.SysCommonProblem;
import com.hzjy.api.mapper.SysCommonProblemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 常见问题Service业务层处理
 * 
 * @author hzjy
 * @date 2020-09-05
 */
@Service
public class SysCommonProblemServiceImpl
{
    @Autowired
    private SysCommonProblemMapper sysCommonProblemMapper;

    /**
     * 查询常见问题
     * 
     * @param id 常见问题ID
     * @return 常见问题
     */
    public SysCommonProblem selectSysCommonProblemById(Long id)
    {
        return sysCommonProblemMapper.selectSysCommonProblemById(id);
    }

    /**
     * 查询常见问题列表
     * 
     * @param sysCommonProblem 常见问题
     * @return 常见问题
     */
    public List<SysCommonProblem> selectSysCommonProblemList(SysCommonProblem sysCommonProblem)
    {
        return sysCommonProblemMapper.selectSysCommonProblemList(sysCommonProblem);
    }

    /**
     * 新增常见问题
     * 
     * @param sysCommonProblem 常见问题
     * @return 结果
     */
    public int insertSysCommonProblem(SysCommonProblem sysCommonProblem)
    {
        return sysCommonProblemMapper.insertSysCommonProblem(sysCommonProblem);
    }

    /**
     * 修改常见问题
     * 
     * @param sysCommonProblem 常见问题
     * @return 结果
     */
    public int updateSysCommonProblem(SysCommonProblem sysCommonProblem)
    {
        return sysCommonProblemMapper.updateSysCommonProblem(sysCommonProblem);
    }

    /**
     * 批量删除常见问题
     * 
     * @param ids 需要删除的常见问题ID
     * @return 结果
     */
    public int deleteSysCommonProblemByIds(Long[] ids)
    {
        return sysCommonProblemMapper.deleteSysCommonProblemByIds(ids);
    }

    /**
     * 删除常见问题信息
     * 
     * @param id 常见问题ID
     * @return 结果
     */
    public int deleteSysCommonProblemById(Long id)
    {
        return sysCommonProblemMapper.deleteSysCommonProblemById(id);
    }
}
